<include file="/public/header" />

<style>
    .layui-card-body {
        padding-left: 0;
    }

    .layui-form-item .layui-input-inline {
        width: 220px;
    }

    .layui-card-body {
        padding-left: 0;
    }

    .layui-form-item .layui-input-inline {
        width: 220px;
    }

    body {
        background-color: #fff;
    }

    .proints {
        margin: 10px 0;
    }

    .title {
        font-weight: bold;
        padding: 15px 0;
        font-size: 18px;
    }

    .products {
        width: 100%;
    }

    .products td,
    .products th {
        padding: 12px 15px;
        box-sizing: border-box;
        border: 1px solid #ebeef5;
    }

    .products .label {
        background-color: #f5f7fa;
        font-weight: bold;
    }

    .width1 {
        width: 23%;
        float: left;
        margin-right: 2%;
    }

    .subbord {
        border: 1px solid #ebeef5;
        padding: 20px 2%
    }

    .subbord table {
        margin: 20px 0;
        width: 100%;
    }

    .width2 {
        width: 46%;
        margin: 0 2%;
        float: left;
    }

    .width3 {
        width: 25%;
        float: left;
    }

    .sclass {
        position: absolute;
        z-index: 999999;
        background: #fff;
        padding: 5px;
        border: 1px solid #dedede;
        display: none;
    }
</style>


<div class="layui-fluid layui-bg-white">
    <form class="layui-form layui-form-pane">
        <input type="text" value="{$data.id}" name="id" hidden="" />
        <div class="layui-form-item">
            <label class="layui-form-label">{:__('ID')}</label>
            <div class="layui-input-block">
                <input value="{$data.id}" readonly disabled class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:__('实际数量')}</label>
            <div class="layui-input-block">
                <input name="product_number" value="{$data.product_number}" type="number" class="layui-input" />
            </div>
            <div class="layui-input-block">按每规格录入，当前规格:({$data.product_spec})</div>
        </div>
        <div class="layui-footer layui-form-item layui-center">
            <button class="layui-btn layui-btn-primary" type="button" sa-event="closeDialog">取消</button>
            <button data-reload="top" class="layui-btn layui-btn-normal" lay-filter="submitIframe" type="button"
                lay-submit>提交</button>
        </div>
    </form>
</div>
<include file="/public/footer" />
<include file="/public/static" />
<script>
    layui.use(['form', 'jquery', 'layedit', 'admin'], function () {
        var form = layui.form;
        var jquery = layui.jquery;
        // 监听权限提交
        form.on("submit(submitPage)", function (post) {
            // 获取用户id
            var pageThat = layui.$(this),
                _pageUrl = !status ? pageThat.attr('lay-edit') : pageThat.attr('lay-add');
            // 开始POST提交数据
            layui.$.post(_pageUrl,
                post.field, function (res) {
                    if (res.code === 200) {
                        layer.msg(res.msg, function () {
                            location.reload();
                        });
                        pageThat.attr("disabled", true);
                    }
                    else {
                        layer.error(res.msg);
                    }

                }, 'json');
            return false;
        })
        // 删除签到数据
        jquery('body').on('click', '#layui-cailiao-content .layui-btn', function () {
            jquery(this).parents('tr').remove();
        })
    });
</script>